import request from '../uniHttp';

// 删除用户
export const deleteUser = async (id?: string|number) => {
  return await request('/user/deleteUser', 'delete', id);
}

// 获取指定ID用户信息
export const getUserById = async (id?: string|number) => {
  return await request('/user/getUserById', 'get', id);
}

// 获取当前登录的用户信息
export const getUserInfo = async (id?: string|number) => {
  return await request('/user/getUserInfo', 'get', id);
}

// 修改当前登录的用户信息
export const updateUser = async (data?: object|any) => {
  return await request('/user/updateUser', 'post', data);
}

// 修改指定用户信息
export const updateUserById = async (data?: object|any) => {
  return await request('/user/updateUserById', 'post', data);
}

// 修改用户密码
export const updatePassword = async (data?: object|any) => {
  return await request('/user/updatePassword', 'post', data);
}

// 获取所有用户信息
export const getUserList = async (data?: object|any) => {
  return await request('/user/getUserList', 'post', data);
}
